<template>
  <BasicModal v-bind="$attrs" @register="registerModal" title="创建实体版本">
    <BasicForm @register="registerForm">
      <template #CollapseSlot>
        <Collapse />
      </template>
    </BasicForm>
  </BasicModal>
</template>
<script lang="ts" setup>
  import { BasicModal, useModalInner } from '/@/components/Modal';
  import { BasicForm, useForm } from '/@/components/Form';
  import { schemas } from './addEntityVersion.data';
  import Collapse from './Collapse.vue';
  const [registerModal, { setModalProps }] = useModalInner(async () => {
    setModalProps({
      destroyOnClose: true,
    });
  });

  const [registerForm] = useForm({
    layout: 'vertical',
    labelWidth: 400,
    schemas,
    showActionButtonGroup: false,
    submitButtonOptions: { text: '全部删除', color: 'primary' },
    resetButtonOptions: { text: '添加实体类型', color: 'primary' },
    submitFunc: async () => {},
    resetFunc: async () => {},
    actionColOptions: {
      span: 24,
    },
  });
</script>
